
import React from 'react';

export const globalData = {
    name: 'admin',
    email: '123@163.com'
  }

export const globalAction=(self)=>({
    changeName(val){
        self.setState(() => ({
            name: val
         }))
        console.log(val);
    }
})

export const globalContext = React.createContext(globalData)